//
//  LEReplyToupleCell.m
//  LoveExpressBusiness
//
//  Created by 刘甲奇 on 2017/5/25.
//  Copyright © 2017年 DFH. All rights reserved.
//

#import "LEReplyToupleCell.h"
#import "MakerTools.h"

@implementation LEReplyToupleCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)loadData:(LEReplyModel *)model indexPath:(NSIndexPath *)path
{
    if (path.section == 0)
    {
        if (path.row == 0)
        {
            self.titleLabel.text = @"买家名称";
            self.contentLabel.text = model.orderModel.buyer_name;
            
        }
        if (path.row == 1) {
            self.titleLabel.text = @"订单状态";
            self.contentLabel.text = model.orderModel.state_desc;
        }
        if (path.row == 2)
        {
            self.titleLabel.text = @"订单号";
            self.contentLabel.text = model.orderModel.order_sn;
            
        }
        if (path.row == 3) {
            self.titleLabel.text = @"下单时间";
            self.contentLabel.text = model.orderModel.add_time;
        }
        if (path.row == 4) {
            self.titleLabel.text = @"订单总额";
            self.contentLabel.text = model.orderModel.order_amount;
        }

    } else if (path.section == 2)
    {
        if (path.row == 0)
        {
            self.titleLabel.text = @"投诉状态";
            
            if ([model.complain_state isEqualToString:@"20"])
            {
                self.contentLabel.text = @"待申诉";
            }else if ([model.complain_state isEqualToString:@"30"])
            {
                self.contentLabel.text = @"对话中";
            }else if ([model.complain_state isEqualToString:@"40"])
            {
                self.contentLabel.text = @"待仲裁";
            }else if ([model.complain_state isEqualToString:@"99"])
            {
                self.contentLabel.text = @"已完成";
            }

        }
        if (path.row == 1) {
            self.titleLabel.text = @"投诉主题";
            self.contentLabel.text = model.complain_subject_content;
        }
        if (path.row == 2)
        {
            self.titleLabel.text = @"投诉时间";
            self.contentLabel.text = [MakerTools getFormatTime:model.complain_datetime];
        }

    }
}

@end
